<?php 
use common\models\ContentArticleCategory;
use yii\helpers\Url;

$HOST_NAME = Yii::$app->params['pc'];
?>
<div class="content-left-box about-w">
	<?php 
	$article = ContentArticleCategory::getBootNav();
	if (is_array($article) && count($article) > 0)foreach ($article as $num=>$articleval){
	    if ($num > 2) continue;
	?>
	<div class="item <?=($num > 0 ? 'mt25' : '')?>">
		<h4 class="h4"><?=$articleval['category_title']?></h4>
		<ul class="item_list">
			<?php 
            if (is_array($articleval['contentArticle']) && count($articleval['contentArticle']) > 0)foreach ($articleval['contentArticle'] as $contentArticle){
                if ($articleval['id'] == ARTICLE_CATEGORY_NEWS_CORE && $contentArticle['id'] == ARTICLE_CATEGORY_NEWS_ARTICLE_DYNAMIC){
                    $contentArticle['article_link'] = Url::to(['article/news-list','id'=>ARTICLE_CATEGORY_NEWS_DYNAMIC]);

                }
            ?>
            <li>
				<?php if($contentArticle['article_link']) :?>
					<a href="<?=$contentArticle['article_link']?>" class="link">
						<?=$contentArticle['article_title']?>
					</a>
				<?php else :?>
					<a href="<?=Url::to(['/article/footer-menu','id'=>$contentArticle['id']])?>" class="link">
						<?=$contentArticle['article_title']?>
					</a>
				<?php endif;?>
			</li>
            <?php }?>
		</ul>
	</div>
	<?php }?>
</div>

<?= \Yii::$app->view->renderFile('@app/views/common/back-top.php');?>